-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support STORAGE_RESOURCE_BINDING_ARRAY on Metal #8464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
a5304ee to
a638db8
Compare
a638db8 to
9d371f3
Compare
cwfitzgerald
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, some testing related issues:
- Could you add METAL to the targets list in
targets = "WGSL | SPIRV" - Could you run the tests and make sure that the binding_array_storage_buffers and parital_binding_array_storage_buffers are running and passing?
- The issue with cargo-deny, you can add the git for metal-rs to deny.toml for now.
- The linux failure should fix itself with a rebase/merge of main.
|
Okay after further work on this PR, I've realized that binding arrays of storage textures work (great!) but binding arrays of buffers are totally broken. Fully supporting buffers in binding arrays seems to require more work in Naga, and it feels like a bigger rabbithole than I want to go down right now. I've reduced the scope of the PR to only support storage textures in binding arrays now, not buffers. This also means no metal-rs changes. |
cwfitzgerald
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright looks fine - though the user won't be able to know that storage buffers aren't supported, but that's fine as a stop gap, are the tests for storage textures running/passing?
Connections
Depends on gfx-rs/metal-rs#366.
Description
This PR supports using binding arrays of storage textures on Metal.
Testing
I have tested this change locally on my M3 MacBook with Metal 3, and my shaders are able to bind and use the binding arrays as expected.
Squash or Rebase?
Fine to squash.
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.